<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var index="经常看CC3TV能强身壮体,cc3tv真好".search(/cctv/ig);
        // console.log(index);
        // var arr="经常看CCTV能强身壮体,cctv真好".match(/cctv/);//3
        // console.log(arr);
        var reg=/cctv/;
        var str='cct3v真好，我希望来cc3tv工作，离家近，工资高，还不累';
        var b=reg.test(str);
        console.log(b);

    </script>
</body>
</html>